#include "point.hpp"

namespace nmc
{
	Point::Point()
		:x(0), y(0)
	{}

	Point::Point(int x_, int y_)
		:x(x_), y(y_)
	{}

	Point Point::operator+(const Point& point) const
	{
		Point result(x + point.x, y + point.y);

        return result;
	}

	Point Point::operator-(const Point& point) const
	{
		Point result(x - point.x, y - point.y);

		 return result;
	}

	bool Point::operator==(const Point& point) const
	{
		return x == point.x && y == point.y;
	}

	bool Point::operator!=(const Point& point) const
	{
		return !(x == point.x && y == point.y);
	}

	std::ostream& operator<<(std::ostream& out,
                             const Point& point)
	{
		out << "Point [x = "
            << point.x
            << ", y = "
            << point.y
            << "]";

        return out;
	}

}